home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_lag_shiphatch.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  122 lines

  1. # Jones 3D Cog Script
  2. #
  3. # lag_shiphatch.cog
  4. #
  5. # Locked Ships Rotating Door Script
  6. #
  7. # [DS]
  8. #
  9. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  10. #
  11. # =======================================================================================
  12.  
  13. symbols
  14.     message    startup
  15.     message    activate    
  16.  
  17.        thing        hatch0
  18.     thing        trigger
  19.     thing        indyactor
  20.     thing        campos
  21.     thing        inviso_hatch
  22.     thing        inviso_hatch2
  23.     surface    catch0
  24.     surface    catch1
  25.     surface    catch2
  26.     surface    stop_face
  27.     cog        hints            #send message when complete. 
  28.     thing        player                        local
  29.     int        open=1                        local
  30.     int        curcam                        local
  31.     int        hatchsnd                        local
  32.     keyframe    in_smack=0in_uw_hammer.key            local
  33.     keyframe    in_open=0in_swim_openhatch.key        local
  34.     keyframe    in_nope=in_uw_pickup_noput.key        local
  35.     sound        opensnd=lag_rustydoor_c.wav            local
  36.     sound        smakit=lag_hammer_uw.wav            local
  37.     sound        breakit=lag_propbreak_c.wav            local
  38.  
  39. # --------- Hammer hand ---------------------
  40.     model        hammerhnd=hand_in_hammer.3do            local
  41.     int        swapRef                        local
  42.  
  43.  
  44.  
  45. end
  46.  
  47. # ========================================================================================
  48.  
  49. code
  50. startup:
  51.     sleep(0.1);
  52.     player = GetLocalPlayerThing();
  53.     SetCollideType(inviso_hatch, 0);
  54.     SetCollideType(inviso_hatch2, 0);
  55.     return;
  56.  
  57. activate:
  58.     if(open == 0) return;
  59.     if(GetSenderRef() != trigger) return;
  60.     curCam = GetCurrentCamera();
  61.  
  62.       if (GetCurItem(player) == 93)                #hammer.
  63.     {
  64.     SetThingFlags(player, 0x80000);
  65.     SetActorFlags(player, 0x200000);
  66.     CopyPlayerHolsters(player, indyactor);
  67.     StartCutscene(1);
  68.  
  69.     # Put the hammer in Indy's hand (15 is his right hand mesh)
  70.     swapRef = SetThingMesh(indyactor, 15, hammerhnd, 0);
  71.  
  72.     ClearThingFlags(indyactor, 0x80000);
  73.     SetCameraLookInterp(2, 0);            # turns off interp to lookthing.
  74.     SetCameraFocus(2, campos);
  75.     SetCameraSecondaryFocus(2, indyactor);
  76.     SetCurrentCamera(2);
  77.     SetCameraFOV(90, 0, 0);                # makes sure set to default.    
  78.  
  79.         PlayKey(indyactor, in_smack, 4, 0x12, 0);
  80.         sleep(1.5);
  81.         PlaySoundThing(smakit, trigger, 1.0, 25, 50, 0);
  82.         sleep(1.0);
  83.         PlaySoundThing(smakit, trigger, 1.0, 25, 50, 0);
  84.         sleep(1.0);
  85.         PlaySoundThing(smakit, trigger, 1.0, 25, 50, 0);
  86.         sleep(0.5);        
  87.         PlaySoundThing(breakit, trigger, 1.0, 15, 30, 0);
  88.  
  89.     DestroyThing(trigger);
  90.     SetAdjoinFlags(stop_face, 2);
  91.     hatchsnd = PlaySoundThing(opensnd, hatch0, 1.0, 4, 12, 0);
  92.     PlayKey(indyactor, in_open, 4, 0x12, 0);
  93.     Rotate(hatch0, -100, 2, 1);
  94.     SetCollideType(hatch0, 0);
  95.     SetCollideType(inviso_hatch, 3);
  96.     SetCollideType(inviso_hatch2, 3);
  97.     SetSurfaceFlags(catch0, 0x2000000);            #water climbout ledge.
  98.     SetSurfaceFlags(catch1, 0x2000000);            #water climbout ledge.
  99.     SetSurfaceFlags(catch2, 0x2000000);            #water climbout ledge.
  100.     WaitForSound(hatchsnd);
  101.     CopyOrientAndPos(indyactor, player);
  102.     EndCutscene();
  103.     SetCurrentCamera(curCam);
  104.     SetThingFlags(indyactor, 0x80000);
  105.     ClearActorFlags(player, 0x200000);
  106.     ClearThingFlags(player, 0x80000);
  107.     SendMessage(hints, user2);
  108.     open = 0;
  109.     return;
  110.     }
  111.     else
  112.     {
  113.     Print("It's rusted shut");
  114.     SetActorFlags(player, 0x200000);
  115.     PlayKey(player, in_nope, 4, 0x12, 1);
  116.     ClearActorFlags(player, 0x200000);
  117.     return;
  118.     }
  119.  
  120. end
  121.  
  122.